const path = require('path');

module.exports = {
    mode: "development",
    /*入口*/
    entry: './index.js',

    /*输出到dist文件夹，输出文件名字为index.js*/
    output: {
        path: path.join(__dirname, './dist'),
        filename: 'index.js'
    },

    module: {
        rules: [{
            test: /\.(js)$/, // 匹配.js文件
            exclude: /node_modules/,
            use: {
                loader: 'babel-loader'
            }
        }]
    }


};